home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16056 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.4 KB  |  37 lines

  1. Newsgroups: comp.lang.c++
  2. Path: netcom.com!milod
  3. From: milod@netcom.com (John DiCamillo)
  4. Subject: Re: Help - ERROR: Use C++ with iostream.h - ???
  5. Message-ID: <milodDpK638.23E@netcom.com>
  6. Organization: NETCOM On-line Communication Services (408 261-4700 guest)
  7. References: <31671633.33DD@inforamp.net> <N.040896.100149.11@ix.netcom.com>
  8. Date: Mon, 8 Apr 1996 19:28:19 GMT
  9. Sender: milod@netcom16.netcom.com
  10.  
  11. >> When I run a program I brought from schoo, that is properly formatted and
  12. >> runs on the UNIX/PowerPC system there, I get an error like "Use C++ with
  13. >> iostream.h". I even renamed the first character in the header file from 
  14. >> an upper case "I" to a lower case "i". Any ideas?
  15.  
  16. It probably means that your C++ compiler "thinks" its
  17. compiling a C program, not a C++ program.  Some compilers
  18. are picky about the filename extensions:
  19.  
  20.   use *.cpp for C++ source files
  21.   use *.hpp for C++ header files
  22.  
  23. Note: I'm not saying that files "should" be named a
  24. certain way, only that some compilers may insist on it.
  25.  
  26. Also, there is usually a compiler setting to force the
  27. compiler to treat all input files as either C or C++
  28. source code.  Try the help system to find the appropriate
  29. incantation.
  30.  
  31. -- 
  32.     ciao,
  33.     milo
  34. ================================================================
  35.     John DiCamillo                         Fiery the Angels Fell 
  36.     milod@netcom.com       Deep thunder rode around their shores
  37.